home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
coreaids.arc
/
CHG_DIR.ASM
< prev
next >
Wrap
Assembly Source File
|
1987-06-25
|
821b
|
37 lines
; DESC: Changes to a new directory using the path provided V1.00
; IN: *{SEG_VAL} segment and
; *{OFFSET} offset of path string
; SAMPLE: Callm CHG_DIR,<SEG_VAL,OFFSET>,
; ##################################################################
Extrn PUSHALL:Near
Extrn POPALL:Near
Extrn ERRORMSG:Near
CHG_DIRC Segment
Assume CS:CHG_DIRC
Public CHG_DIR
;notice.
DB 'CHG_DIR - V1.00, Copyright 1987, CoreTechs ',0DH,0AH
CHG_DIR Proc Near ;changes to a new directory.
Call PUSHALL
Pop DX ;get the filename offset.
Pop DS ;get the segment offset.
Mov AH,3BH ;change to a new directory.
Int 21H
Jc ERROR ;if error occurs, report it.
Call POPALL
Ret
ERROR: Push AX ;report error any and abort.
Call ERRORMSG
CHG_DIR Endp
CHG_DIRC Ends
End